package overall.message.game
{
	import flash.utils.ByteArray;
	
	import xnet.Message.ISokcetMessage;
	import xnet.Message.MessageBase;
	
	public class GameStartMsg extends MessageBase
	{
		public function GameStartMsg()
		{
			super();
		}

		
		public var token:String;
		public var dice0:int;
		public var dice1:int;
		public var bankerUser:int;
		public var currentUser:int;
		public var cardData:Vector.<int>;
		public var actInt:int;
		override public function decodeSocketData(byteArray:ByteArray):ISokcetMessage
		{
			cardData=new Vector.<int>
			type = byteArray.readByte();
			token=byteArray.readUTF();
			dice0=byteArray.readInt();
			dice1=byteArray.readInt();
			bankerUser=byteArray.readInt();
			currentUser=byteArray.readInt();
			actInt=byteArray.readInt();
			byteArray.readShort();
			var leng:int=byteArray.readShort();
			for(var i:int=0;i<leng;i++){
				cardData[i]=byteArray.readByte();
			}
			return this;
		}	
	}
}